package org.jeecg.modules.operations.assistant.work.service;

import org.jeecg.modules.operations.assistant.work.entity.*;
import com.baomidou.mybatisplus.extension.service.IService;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 工单信息
 * @Author: jeecg-boot
 * @Date:   2024-01-07
 * @Version: V1.0
 */
public interface IWorkOrderService extends IService<WorkOrder> {

	/**
	 * 添加一对多
	 *
	 * @param workOrder
	 * @param installationOrderList
	 * @param maintainOrdersList
	 * @param workOrderProcessList
	 */
	public void saveMain(WorkOrder workOrder,List<InstallationOrder> installationOrderList,List<MaintainOrders> maintainOrdersList,List<WorkOrderProcess> workOrderProcessList) ;
	
	/**
	 * 修改一对多
	 *
	 * @param workOrder
	 * @param installationOrderList
	 * @param maintainOrdersList
	 * @param workOrderProcessList
	 * @param attendanceRecordList
	 */
	public void updateMain(WorkOrder workOrder,List<InstallationOrder> installationOrderList,List<MaintainOrders> maintainOrdersList,List<WorkOrderProcess> workOrderProcessList,List<AttendanceRecord> attendanceRecordList);
	
	/**
	 * 删除一对多
	 *
	 * @param id
	 */
	public void delMain (String id);
	
	/**
	 * 批量删除一对多
	 *
	 * @param idList
	 */
	public void delBatchMain (Collection<? extends Serializable> idList);

	/**
	 * 修改一对多
	 *
	 * @param workOrder
	 * @param workOrderProcessList
	 */
	public void updateMain(WorkOrder workOrder,List<WorkOrderProcess> workOrderProcessList);

	/**
	 * 修改一对多
	 *
	 * @param workOrder
	 * @param workServiceRecordsList
	 */
	public void updateServiceRecords(WorkOrder workOrder,List<WorkServiceRecords> workServiceRecordsList,List<WorkOrderProcess> workOrderProcessList);

	/**
	 * 修改一对多
	 *
	 * @param workOrder
	 * @param workOrderProcessList
	 * @param attendanceRecordList
	 */
	public void updateMain(WorkOrder workOrder,List<WorkOrderProcess> workOrderProcessList,List<AttendanceRecord> attendanceRecordList);

	/**
	 * 修改一对多
	 *
	 * @param workOrder
	 * @param followUpList
	 */
	public void updateFollowUp(WorkOrder workOrder,List<FollowUp> followUpList,List<WorkOrderProcess> workOrderProcessList);

	/**
	 * 修改一对多
	 *
	 * @param workOrder
	 * @param workOrderReceiptList
	 */
	public void updateWorkOrderReceipt(WorkOrder workOrder,List<WorkOrderReceipt> workOrderReceiptList,List<WorkOrderProcess> workOrderProcessList);

	/**
	 * 修改一对多
	 *
	 * @param workOrder
	 * @param workOrderReceiptList
	 */
	public void receiptReview(WorkOrder workOrder,List<WorkOrderReceipt> workOrderReceiptList,List<WorkOrderProcess> workOrderProcessList);

	public WorkOrderStatistics statistics();

	public WorkOrderStatistics statistics(String userName);
}
